InĀ [1]:
import trimesh
def load_mesh_scene(filename, show_edges=False):
mesh = trimesh.load(filename)
color = [128, 176, 255, 255]
mesh.visual.face_colors = color
geometries = [mesh]
if show_edges:
edges = mesh.face_adjacency_edges
path = trimesh.path.Path3D(**trimesh.path.exchange.misc.edges_to_path(edges, mesh.vertices.copy()))
geometries.append(path)
scene = trimesh.Scene(geometries)
return mesh, scene
InĀ [2]:
mesh, scene = load_mesh_scene("Radial scales_fixed13-90MB.stl")
InĀ [3]:
mesh.vertices
Out[3]:
InĀ [5]:
scene.show()
Out[5]: